package org.ocaf.models;

import org.ocaf.interfaces.Model;

/**
 * A DoerProduction is basically the object a Doer returns back to the framework after its
 * done doing its work. A doer may return HTML, XML or text as of this current release. I
 * could see in the future this being a bit more generic perhaps, but for now this is a web
 * application framework and these are probably the more common types. PDF maybe? I dunno. 
 * 
 * @author David Palmer <blinder.dave@gmail.com>
 * @version $Id$
 */
public class DoerProduct implements Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6722776301758574093L;
	
	private String html;
	private String xml;
	private String text; 
	private String name;
	
	/**
	 * Empty constructor -- for now. 
	 */
	public DoerProduct () {}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;

	}

	public String getHtml() {
		return html;
	}

	public void setHtml(String html) {
		this.html = html;
	}

	public String getXml() {
		return xml;
	}

	public void setXml(String xml) {
		this.xml = xml;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof DoerProduct))
			return false;
		final DoerProduct other = (DoerProduct) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}
	
	

}
